import request from '@/utils/request'

// 查询企业份额列表
export function listenterpriseShare(query) {
  return request({
    url: '/enterprise/enterpriseShare/list',
    method: 'get',
    params: query
  })
}

// 查询企业份额详细
export function getenterpriseShare(id) {
  return request({
    url: '/enterprise/enterpriseShare/' + id,
    method: 'get'
  })
}

// 新增企业份额
export function addenterpriseShare(data) {
  return request({
    url: '/enterprise/enterpriseShare',
    method: 'post',
    data: data
  })
}

// 修改企业份额
export function updateenterpriseShare(data) {
  return request({
    url: '/enterprise/enterpriseShare',
    method: 'put',
    data: data
  })
}

// 删除企业份额
export function delenterpriseShare(id) {
  return request({
    url: '/enterprise/enterpriseShare/' + id,
    method: 'delete'
  })
}

// 导出企业份额
export function exportenterpriseShare(query) {
  return request({
    url: '/enterprise/enterpriseShare/export',
    method: 'get',
    params: query
  })
}

// 获取总份额和已分配额
export function allShare() {
  return request({
    url: '/enterprise/enterpriseShare/allShare',
    method: 'get'
  })
}


//  修改总份额参数
export function updateAllShare(data) {
  return request({
    url: '/enterprise/enterpriseShare/updateAllShare',
    method: 'post',
    data
  })
}
